package comprehensive_case;

import java.util.Scanner;

public class 卖飞机票 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        System.out.println("请输入机票的价格：");
        int money = sc.nextInt();
        System.out.println("请输入当前月份：");
        int mouth = sc.nextInt();
        System.out.println("请输入仓位0经济舱 1头等舱");
        int seat = sc.nextInt();

        if (mouth >= 5 && mouth <= 10) {
            // 旺季
            if (seat == 0) {
                money = (int) (money * 0.9);
            } else if (seat == 1) {
                money = (int) (money * 0.85);
            } else {
                System.out.println("没有这个仓位");
            }
        } else if ((mouth >= 1 && mouth <= 4) || (mouth >= 11 && mouth <= 12)) {
            // 淡季
            if (seat == 0) {
                money = (int) (money * 0.65);
            } else if (seat == 1) {
                money = (int) (money * 0.7);
            } else {
                System.out.println("没有这个仓位");
            }
        } else {
            System.out.println("没有这个月份");
        }
        System.out.println(money);
        sc.close();
    }
}
